package work.jame.blog.mapper;

import org.apache.ibatis.annotations.Param;
import work.jame.blog.pojo.UserCommentOperation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Jame
 * @since 2023-05-20
 */
public interface UserCommentOperationMapper extends BaseMapper<UserCommentOperation> {

    /**
     * 修改用户评论的状态为喜欢
     * @param commentId 评论id
     * @param userId 用户id
     * @return 影响行数
     */
    Integer updateStatusToLike(@Param("commentId")Long commentId,
                               @Param("userId")Long userId);

    /**
     * 修改用户评论的状态为不喜欢
     * @param commentId 评论id
     * @param userId 用户id
     * @return 影响行数
     */
    Integer updateStatusToNotLike(@Param("commentId")Long commentId,
                               @Param("userId")Long userId);
}
